import Vue from 'vue'
import VueRouter from 'vue-router'

import IndexPage from '@/pages/index'
import DetailPage from '@/pages/detail'
import OrderListPage from '@/pages/orderList'
import DetailAnaPage from '@/pages/detail/analysis'
import DetailCouPage from '@/pages/detail/count'
import DetailForPage from '@/pages/detail/forecast'
import DetailPubPage from '@/pages/detail/publish'
import AweDnd from '@/pages/aweDnd/index'
import LazyLoad from '@/pages/lazyLoad/index'
import Swiper from '@/pages/swiper/index'

Vue.use(VueRouter)

export default new VueRouter({
	mode: 'history',
	routes: [
		{
			path: '/',
			component: IndexPage
		}, {
			path: '/orderList',
			component: OrderListPage
		}, {
			path: '/detail',
			component: DetailPage,
			redirect: '/detail/analysis',
			children: [
				{
					path: 'analysis',
					component: DetailAnaPage
				}, {
					path: 'count',
					component: DetailCouPage
				}, {
					path: 'forecast',
					component: DetailForPage
				}, {
					path: 'publish',
					component: DetailPubPage
				}

			]
		}, {
			path: '/aweDnd',
			component: AweDnd
		},
		{
			path: '/lazyLoad',
			component: LazyLoad
		},
		{
			path: '/swiper',
			component: Swiper
		}
	]
})
